/* pages/home/home.wxss */
@import "./home.skeleton.wxss";

.home {
  background: #F4F4F4;
  padding-top: 292rpx;
}

.tab {
  width: 100%;
  height: 292rpx;
  position: fixed;
  background: #fff;
  top: 0;
  left: 0;
  z-index: 100;

  .bg {
    width: 100%;
    height: 292rpx;
  }

  .cy {
    width: 134rpx;
    height: 52rpx;
    position: absolute;
    left: 28rpx;
    top: 110rpx;
  }

  .input_bar {
    position: absolute;
    left: 24rpx;
    right: 24rpx;
    top: 204rpx;
    height: 60rpx;
    display: flex;
    align-items: center;
    // width: 100%;
    // box-sizing: border-box;
    // display: flex;
    // justify-content: space-between;
    .searcBbox {
      flex: 1
    }
    .search {
      padding: 0 !important;
      border-radius: 8rpx;
      overflow: hidden;
    }

    .input {
      border-radius: 20rpx !important;
    }

    .tab_bar_item {
      font-size: 28rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #333333;
      line-height: 40rpx;
      height: 40rpx;
    }

    .select {
      font-size: 32rpx;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #111111;
      line-height: 44rpx;
      height: 44rpx;
      transform: translateY(-2rpx);
      position: relative;

      &::after {
        content: "";
        display: block;
        background: #FA4743;
        border-radius: 3px;
        width: 46rpx;
        height: 6rpx;
        position: absolute;
        bottom: -6rpx;
        left: 50%;
        transform: translateX(-50%);
      }
    }
  }
}

.home_bg {
  width: 100%;
  height: 868rpx;
  // background: #fff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

.z10 {
  position: relative;
  z-index: 10;
}

.z100 {
  background: #fff;
  left: 0;
  right: 0;
  position: fixed;
  z-index: 100;
}

// 下拉刷新loading动画
@keyframes dotFlashing {
  0% {
    background-color: #ccc;
  }

  100% {
    background-color: #999;
  }
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100rpx;
  overflow: hidden;

  &.pullLoading {
    // 这里是关键
    margin-top: -100rpx;
  }

  // 模拟微信小圆点
  .dot {
    display: inline-block;
    position: relative;
    width: 14rpx;
    height: 14rpx;
    border-radius: 50%;
    background: #999;
    animation: dotFlashing .5s infinite linear alternate;
    animation-delay: .5s;

    &::before {
      left: -28rpx;
      animation: dotFlashing .5s infinite alternate;
      animation-delay: 0s;
    }

    &::after {
      left: 28rpx;
      animation: dotFlashing .5s infinite alternate;
      animation-delay: .5s;
    }

    &::before,
    &::after {
      content: '';
      display: inline-block;
      position: absolute;
      top: 0;
      width: 14rpx;
      height: 14rpx;
      border-radius: 50%;
      background: #999;
    }
  }
}

.swiper {
  padding: 0 24rpx;
  // background: fff;
  border-radius: 10rpx;
  overflow: hidden;
  position: relative;
  z-index: 90;

  swiper,
  swiper-item {
    height: 300rpx;
    border-radius: 8rpx;
  }

  image {
    width: 100%;
    height: 300rpx;
  }

  .wx-swiper-dot {
    width: 12rpx;
    height: 12rpx;
    border-radius: 6rpx;
    background-color: rgba(0, 0, 0, 0.5);
  }

  .wx-swiper-dot-active {
    width: 36rpx;
    background: #FFFFFF;
  }
}

.tab_swiper {
  padding: 32rpx 24rpx 0;
  background: #fff;

  swiper,
  swiper-item {
    height: 188rpx;
  }

  swiper-item {
    display: flex;
  }

  .wx-swiper-dot {
    width: 24rpx;
    height: 4rpx;
    background: #DFE3EB;
    margin-left: -10rpx;
    border-radius: 0;
    transform: skewX(-30deg);
  }

  .wx-swiper-dot-active {
    background: #FA4743;
  }

  .wx-swiper-dots.wx-swiper-dots-horizontal {
    bottom: 12rpx;
  }

  .tab_swiper_item {
    width: 25%;
    text-align: center;
    font-size: 28rpx;
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    color: #111111;
    line-height: 40rpx;

    .icon {
      width: 88rpx;
      height: 88rpx;
      display: block;
      margin: 0 auto;
      margin-bottom: 8rpx;
    }
  }
}

.ranking {
  display: flex;
  justify-content: space-between;
  // background: #fff;
  padding: 44rpx 16rpx 0;

  image {
    display: block;
    width: 216rpx;
    height: 132rpx;
  }
}

.tab_bar {
  padding: 44rpx 40rpx 0;
  // background: #fff;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 30rpx;
  color: #666666;
  line-height: 32rpx;
  display: flex;
  justify-content: space-between;

  .tab_bar_item {
  }

  .select {
    font-weight: 600;
    font-size: 34rpx;
    color: #111111;
    position: relative;
    height: 56rpx;

    &::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      height: 6rpx;
      width: 100%;
      background: #FA4743;
      border-radius: 200rpx 200rpx 0rpx 0rpx;
    }
  }
}

.shop-list {
  margin: 8rpx 24rpx 0;
  padding-bottom: 32rpx;

  .shop-list-cont {
    display: flex;
    flex-wrap: wrap;
  }

  .shop-list-info {
    font-size: 24rpx;
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    color: #BBBBBB;
    line-height: 34rpx;
    margin-top: 32rpx;
    text-align: center;
  }

  .shop-list-item {
    width: 342rpx;
    border-radius: 8rpx;
    overflow: hidden;
    margin-top: 16rpx;
    background: #fff;

    &:nth-child(odd) {
      margin-right: 18rpx;
    }

    image {
      width: 342rpx;
      height: 342rpx;
      display: block;
    }

    .progess {
      height: 6rpx;
    }

    .van-progress {
      border-radius: 0;
      margin-top: 2rpx;
      height: 4rpx !important;
    }

    .van-progress__portion {
      border-radius: 0;
    }

    .tit {
      font-size: 26rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #111111;
      height: 72rpx;
      line-height: 36rpx;
      margin: 12rpx 20rpx 0;
      display: -webkit-box;
      overflow: hidden;
      text-overflow: ellipsis;
      line-clamp: 2;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;

      .icon {
        width: 72rpx;
        height: 28rpx;
        margin-right: 10rpx;
        display: inline-block;
        transform: translateY(6rpx);
      }

      .new {
        border: 1rpx solid #00C4A1;
        color: #00C4A0;
      }

      .hot {
        border: 1rpx solid #FA4743;
        color: #FA4743;
      }

      .recommend {
        border: 1rpx solid #FF612B;
        color: #FF612B;
      }

      .label {
        display: inline-block;
        padding: 0 8rpx;
        font-size: 20rpx;
        // height: 28rpx;
        line-height: 24rpx;
        border-radius: 2px;
        margin-right: 10rpx;
        box-sizing: border-box;
      }

      .name {
        flex: 1;
      }
    }

    .pic {
      margin-left: 20rpx;
      font-size: 26rpx;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #FA4743;
      line-height: 36rpx;
      margin-top: 12rpx;
      margin-bottom: 16rpx;
    }

    .red {
      color: #FA4743;
    }

    .num {
      margin: 12rpx 20rpx 16rpx;
      font-size: 11px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #666666;
      line-height: 16px;
      display: flex;
      justify-content: space-between;
    }
  }
}